package xio.ccf_201709;

import java.util.Scanner;

/**
 * ccf 201709-1 买酱油 100分
 * Created by Xio on 2017/10/20 0020.
 */
public class BuySoy {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int money = sc.nextInt();
        int result  = (money/50) *7 + (money%50/30)*4 + money%50%30/10;
        System.out.printf(result+"");
    }
}
